home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / utils2 / pwrbat22.zip / SCRNSAVE.PWR < prev    next >
Text File  |  1994-05-18  |  6KB  |  146 lines

  1.   ;
  2.   ; Pressing the Escape key will exit this screen saver. The value you place
  3.   ;  in the GoodPass Variable (next line) will be required to exit.
  4.   ;
  5.   Variable    GoodPass,20,'PowerBatch'
  6.   Variable    CurrClr,3                         ;curr color when we start
  7.   Variable    Pass,20,''
  8.   Variable    Work,80
  9.   Variable    InChar,1
  10.   Variable    Esc,1,#27
  11.   Variable    Lgth,2                            ;string length
  12.   Variable    OffSet,2                          ;offset within the box
  13.   Variable    Spec,1                            ;tells us if we time out
  14.   Variable    XLoc,2                            ;left X
  15.   Variable    YLoc,2                            ;upper Y
  16.   Variable    X2Loc,2                           ;right X
  17.   Variable    Y2Loc,2                           ;lower Y
  18.   Variable    WinUX,2                           ;window upper x
  19.   Variable    WinUY,2                           ;window upper y
  20.   Variable    WinLX,2                           ;lower x
  21.   Variable    WinLY,2                           ;lower y
  22.   Variable    PassX,2
  23.   Variable    PassY,2
  24.   Variable    WXLoc,2                           ;work
  25.   Variable    WYLoc,2
  26.   Variable    XAdjust,2
  27.   Variable    Clr,3,224
  28.   Variable    Normal,1,1
  29.   Variable    Off,1,2
  30.   Variable    Months,108,'January  February March    April    May      June     July     August   SeptemberOctober  November December '
  31.   Variable    CurrMonth,9
  32.   Variable    HLine,40,'├──────────────────────────────────────┤'
  33.   Variable    Secs,2
  34.   Variable    CurrTime,11
  35.   Variable    Month,2
  36.   Variable    Day,2
  37.   Variable    Year,4
  38.   Variable    MsgName,27,''
  39.   Variable    Msg,255,'Enter your name and a brief message..'
  40.   ?Color      Work,Work,CurrClr                 ;get curr sys color
  41.   EnhanClr    1                                 ;enhanced colors on
  42.  
  43. Label     WaitLoop
  44.   Window0     1,1,80,25
  45.   SetVar      Secs,0                            ;init our counter
  46.   Cursor      Off                               ;turn cursor off
  47.   Random      39,XLoc                           ;get a random X
  48.   Add         XLoc,1                            ;cant be zero
  49.   SetVar      X2Loc,XLoc                        ;calculate box right side
  50.   Add         X2Loc,39
  51.   SetVar      WinUX,XLoc                        ;for our msg window
  52.   Add         WinUX,1
  53.   SetVar      PassX,XLoc                        ;for password?
  54.   Add         PassX,1
  55.   Random      11,YLoc                           ;get a random Y
  56.   Add         YLoc,1                            ;cant be zero
  57.   SetVar      Y2Loc,YLoc                        ;calculate box bottom
  58.   Add         Y2Loc,12
  59.   SetVar      WinUY,YLoc                        ;for our msg window
  60.   Add         WinUY,6
  61.   SetVar      PassY,Y2Loc                       ;for password?
  62.   Subtract    PassY,1
  63.   SetVar      WinLX,X2Loc
  64.   Subtract    WinLX,2
  65.   SetVar      WinLY,Y2Loc
  66.   Subtract    WinLY,2
  67.   ?Date       Work,Month,Day,Year               ;get the date
  68.   Subtract    Month,1                           ;use it as an offset in our tbl
  69.   Multiply    Month,9                           ;each entry is 9 long
  70.   Compare     Month,0,MonthOK                   ;first entry is 1
  71.   Add         Month,1
  72. Label     MonthOK
  73.   Add         Month,1
  74.   MidString   CurrMonth,Months,Month,9          ;get the name from the table
  75.   Trim        CurrMonth                         ;trim the trailing spaces
  76.   Concat      Work,CurrMonth,' ',Day,', ',Year  ;pretty up the date
  77.   Clear       0
  78.   Color       Clr
  79.   Box1        XLoc,YLoc,X2Loc,Y2Loc,Clr         ;draw our box
  80.   SetVar      WYLoc,YLoc
  81.   Add         WYLoc,3
  82.   WriteAt     XLoc,WYLoc,HLine,Clr
  83.   Add         WYLoc,2
  84.   WriteAt     XLoc,WYLoc,HLine,Clr
  85.   SetVar      WXLoc,XLoc
  86.   Add         WXLoc,15
  87.   WriteAt     WXLoc,WYLoc,'┤Message├'
  88.   Subtract    WYLoc,1
  89.   Subtract    WXLoc,14
  90.   WriteAt     WXLoc,WYLoc,'Your Name '
  91.   Write       '                           ',180
  92.   Add         WXLoc,10
  93.   WriteAt     WXLoc,WYLoc,MsgName,184
  94.   Subtract    WXLoc,10
  95.   Window0     WinUX,WinUY,WinLX,WinLY
  96.   Write       Msg
  97.   Window0     1,1,80,25
  98.   SetVar      WYLoc,YLoc
  99.   Add         WYLoc,1
  100.   WriteAt     WXLoc,WYLoc,'          Leave Me A Message          ',20
  101.   Add         WYLoc,1
  102.   WriteAt     WXLoc,WYLoc,Work                   ;date
  103.   SetVar      WXLoc,XLoc
  104.   Add         WXLoc,10
  105.   WriteAt     WXLoc,Y2Loc,' PowerBatch Ver 2.2 '   ;write our first line
  106.   SetVar      WXLoc,XLoc
  107.   SetVar      WYLoc,YLoc
  108.   Add         WYLoc,2                           ;adjust Y for the next line
  109.   Add         WXLoc,1                           ;calculate location for date
  110.   WriteAt     WXLoc,WYLoc,Work                  ;write date since it may change
  111.   SetVar      WXLoc,X2Loc
  112.   Subtract    WXLoc,11
  113.   Add         XLoc,11
  114.   Add         YLoc,4
  115. Label     TimeLoop                              ;get the time each loop
  116.   ?Time       CurrTime                          ;update time
  117.   WriteAt     WXLoc,WYLoc,CurrTime
  118.   GoToXY      XLoc,YLoc
  119.   Color       180
  120.   Cursor      Normal
  121.   ReadKey     InChar,Spec,1
  122.   Compare     InChar,'',TakeMsg                 ;key entered?
  123.   Color       Clr
  124.   Add         Secs,1                            ;no key
  125.   Compare     Secs,10,WaitLoop,TimeLoop,WaitLoop ;big loop or small loop
  126.  
  127. Label     TakeMsg
  128.   Compare     InChar,Esc,,,End
  129.   SetVar      Msg,''
  130.   ReadStr     MsgName
  131.   Color       Clr
  132.   Concat      MsgName,InChar,MsgName
  133.   Window0     WinUX,WinUY,WinLX,WinLY
  134.   Clear
  135.   ReadStr     Msg
  136.   GoTo        WaitLoop
  137.  
  138. Label     End
  139.   Color       Clr
  140.   WriteAt     PassX,PassY,'PassWord:'
  141.   ReadStr     Pass
  142.   Compare     Pass,GoodPass,WaitLoop,WaitLoop
  143.   Color       CurrClr                           ;restore colors
  144.   EnhanClr    0                                 ;set regular colors
  145.   Clear       CurrClr                           ;and clear the screen
  146.